﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Model
{
    [Table("Carrier")]
    public class Carrier
    {
        private int _carrierId;
        private string _carrierName;
        private string _carrierType;
        private string _detailedCarrierType;
        private string _carrierStatus;
        private int _carrierCapacity;
        private int _locationNumber;
        private int _quantity;
        private string _capacityStatus;
        private string _lockStatus;
        private string _cleaningStatus;
        private string _transportStatus;

        // 载具 ID（主键）
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int CarrierId
        {
            set { _carrierId = value; }
            get { return _carrierId; }
        }

        // 载具名称（非空，唯一）
        [Required]
        [StringLength(255)]
        public string CarrierName
        {
            set { _carrierName = value; }
            get { return _carrierName; }
        }

        // 载具类型（非空）
        [Required]
        [StringLength(255)]
        public string CarrierType
        {
            set { _carrierType = value; }
            get { return _carrierType; }
        }

        // 载具详细类型（非空）
        [Required]
        [StringLength(255)]
        public string DetailedCarrierType
        {
            set { _detailedCarrierType = value; }
            get { return _detailedCarrierType; }
        }

        // 载具状态（非空）
        [Required]
        [StringLength(50)]
        public string CarrierStatus
        {
            set { _carrierStatus = value; }
            get { return _carrierStatus; }
        }

        // 载具容量（非空）
        [Required]
        public int CarrierCapacity
        {
            set { _carrierCapacity = value; }
            get { return _carrierCapacity; }
        }

        // 位置号（非空）
        [Required]
        public int LocationNumber
        {
            set { _locationNumber = value; }
            get { return _locationNumber; }
        }

        // 数量（非空）
        [Required]
        public int Quantity
        {
            set { _quantity = value; }
            get { return _quantity; }
        }

        // 容量状态（非空）
        [Required]
        [StringLength(50)]
        public string CapacityStatus
        {
            set { _capacityStatus = value; }
            get { return _capacityStatus; }
        }

        // 锁定状态（非空）
        [Required]
        [StringLength(50)]
        public string LockStatus
        {
            set { _lockStatus = value; }
            get { return _lockStatus; }
        }

        // 清洗状态（非空）
        [Required]
        [StringLength(50)]
        public string CleaningStatus
        {
            set { _cleaningStatus = value; }
            get { return _cleaningStatus; }
        }

        // 搬送状态（非空）
        [Required]
        [StringLength(50)]
        public string TransportStatus
        {
            set { _transportStatus = value; }
            get { return _transportStatus; }
        }

        // 构造函数
        public Carrier()
        {
            // 可以在构造函数中初始化一些默认值
        }
    }
}